package com.zjh.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName users
 */
@TableName(value ="users")
@Data
@ApiModel(value = "用户实体")
public class Users {
    /**
     * 用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="用户id",example="1")
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    @ApiModelProperty(value="用户名",example="zhangsan")
    private String username;

    /**
     * 用户邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 
     */
    @TableField(value = "password_hash")
    private String passwordHash;

    /**
     * 姓氏
     */
    @TableField(value = "first_name")
    private String firstName;

    /**
     * 名字
     */
    @TableField(value = "last_name")
    private String lastName;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

    /**
     * 上次登陆时间
     */
    @TableField(value = "last_login")
    private Date lastLogin;

    /**
     * 是否有效
     */
    @TableField(value = "is_active")
    private Integer isActive;

    /**
     * 用户角色
     */
    @TableField(value = "role")
    private Integer role;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}